Repository navigation
バーコードデータの公開、印刷用の実寸出力、代表郵便番号の判定を追加 - #8
Merged
Merged
Conversation
- ZipCode / AddressNumber プロパティを追加(AddressNumber はマニュアルの「バーコード・データ」) - マニュアル p12 の寸法で、mm 単位のバー配置(GetPrintBars)と SVG(ToPrintSvg)を出力 - System.Drawing 版と SkiaSharp 版に、実寸で描画する Draw を追加 - 代表の郵便番号かどうか(下2けたが00)を IsRepresentativeZipCode で判定 - README に使い方を追記 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HNb8H3ydQTR8dWU8d28osE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
3 つの機能を追加しました。
1. バーコードデータの公開
CustomerBarCodeに次のプロパティを追加しました。ZipCode: ハイフンなしの半角 7 桁(例:"1000013")。AddressNumber: マニュアルの「バーコード・データ」にあたる住所表示番号(例:"3-20-5B604")。AddressNumberは 13 けたで切り捨てる前の値です。表示用に情報を残すためで、バーコードに含まれるのは先頭 13 けた分です。この機能のために、生成処理を「住所表示番号の抜き出し」と「シンボル列の組み立て」に分けました。出力は変わっていません(既存テストで確認済み)。
2. 印刷用の実寸出力
マニュアル p12 の寸法で出力します。10 ポイントのとき、バー幅 0.6mm、バーピッチ 1.2mm、ロングバー 3.6mm です。大きさは 8〜11.5 ポイントで指定でき、省略時は 10 ポイントです。
GetPrintWidth()/GetPrintHeight()/GetPrintBars()ToPrintSvg(point, margin)Draw(Graphics, x, y)Draw(SKCanvas, x, y, 1mmあたりの単位数)PdfUnitsPerMillimeterも追加3. 代表郵便番号の判定
IsRepresentativeZipCodeを追加しました。マニュアル p18 では、代表の郵便番号の郵便物にはカスタマバーコードを付けないことになっています。判定はマニュアルの「原則として下 2 けたが 00」に従った目安です。例外にはせず、プロパティで知らせるだけにしています。正確な判定は、次の PR で KEN_ALL(郵便番号データ)を利用者側から渡せるようにして対応する予定です。
テスト
dotnet testで 134 件すべて成功(25 件追加)。🤖 Generated with Claude Code
https://claude.ai/code/session_01HNb8H3ydQTR8dWU8d28osE